The present invention relates to a machining data forming system, with respect to an automatic program, for a numerical control device adapted to control machine tools, robots, laser machining apparatuses, welding machines, adhesive coating machines. A conventional method of inputting and processing data, with respect to an automatic program, for a numerical control device is as follows:
FIG. 9 is a flow chart outlining the conventional method for forming machining data, and FIG. 10 is an explanatory diagram showing a data setting and displaying device with which the operator inputs data by operating an AUTO PRO switch, DISPLAY switch, PARAMETER switch, NC AID switch, etc. through interaction, and observes the data displayed thereon.
As shown in FIG. 10, a CRT display section such as a 14-inch color CRT has a various-data display region 11, an echo data display region 12, and a question and alarm message display region 13. In the following description, the quotation marks (") are placed before and after the names of key switches, for clarification.
An operating section 2 includes a group of echo switches 201 through 208, a "DISPLAY" switch 210, a "PARAMETER" switch 211, an "NC AID" switch 212, an "AUTOMATIC PROGRAM" switch 213, and "UP-DOWN CHANGE-OVER" switch 214.
A data input section 3 includes a group of various data keys 301 such as alphabetical and numerical keys, a group of input operation keys 302 (including ".uparw.", ".rarw.", ".dwnarw." and ".fwdarw." cursor keys 3022, a "NEXT PICTURE" key 3021, an "AUTOMATIC PRO GRAPHIC" key 305, an "INPUT" key 304, etc.), and operation preparation and NC alarm display LEDs 310.
The CRT display section 1 can display more than seventy pictures such as a machining definition start picture (FIG. 11), machining type selection picture (FIG. 12), drilling configuration selection picture (FIG. 13), drill hole machining configuration definition picture (FIG. 14), drilling pattern selection picture (FIG. 15), drilling (arc) pattern definition picture (FIG. 16), drilling (bolt hole, circle) pattern definition picture (FIG. 17), machining step list picture (FIG. 18), and NC data output picture (FIG. 19), which are utilized for a description of the invention as follows:
A conventional inputting and processing method with an automatic program will be described with reference to the inputting procedure in a drilling operation which is shown in FIGS. 7(a) and 7(b).
FIG.7(a) is a plan view showing the position of holes to be drilled in a workpiece, and FIG. 7(b) is a sectional view taken along a line A--A in FIG. 7(a), showing dimensions in a direction of height.
An inputting operation is carried out according to the flow chart of FIG. 9.
For simplification in description, with the assumption that Steps 1 (automatic program start ) through 6 (graphic display) which are not directly concerned with the invention have been accomplished, the description will be made beginning with Step 7.
When the "NET PICTURE" key 3021 (FIG. 10) is depressed at the end of Step 6, the present picture is switched over to the machining definition start picture (FIG. 11). When the echo switch 201 (FIG. 10) corresponding to "1. MACHINING DEFINITION START" in the echo data display section 12 (FIG. 10) is depressed, the picture is switched over to the machining type selection picture (FIG. 12). FIG. 7 is for a drilling operation, and therefore, when the echo switch 201 (FIG. 10) corresponding to "1. drilling" 1211 (FIG. 12) is depressed, the picture is switched over to the drilling configuration selection picture (FIG. 13); and when the echo switch 201 (FIG. 10) corresponding to "1. DRILL HOLE" 1221 (FIG. 13) is depressed, the picture is switched over to the drilling configuration definition picture (FIG. 14).
According to data displayed on the question section 13 (FIGS. 10 and 14), the data keys 301 (FIG. 10) and the "INPUT" key 304 (FIG. 10) are operated. As a result, questions are successively displayed. In response to the questions thus displayed, the corresponding data are inputted with the keys. Thus, the setting of the necessary data has been accomplished.
That is, the machining configuration definition (Step 7 in FIG. 9) has been accomplished. When, under this condition, the "NEXT PICTURE" key 3021 (FIG. 10) is depressed, the picture is switched over to the drilling pattern selection picture (FIG. 15) corresponding to the machining position pattern definition in Step 8. The drilling position shown in FIG. 7 corresponds to "1. ARC" pattern in the displayed picture 11 (FIG. 15). Therefore, the echo switch 201 (FIG. 10) corresponding to "1. ARC" pattern 1231 in the displayed picture 11 (FIG. 15) is depressed, as a result of which the picture is switched over to the drilling (arc) pattern definition picture (FIG. 16). According to the picture shown in FIG. 16, the inputting of data is started.
As for "1. CENTRAL POSITION X=( ), Y=( )" of the group of questions in the data display section 11, since central position (a, b) is not specified in the picture (FIG. 7), the operator calculates it manually or with a desk top electronic calculator taking about ten minutes in maximum.
One example of the central position calculating operation will be described with reference to FIGS. 20(a) to (c). First, the operation in the case where, as shown in FIG. 20(b), a machining start point (Xs, Ys), a machining end point (Xe, Ye), and a radius Rn have been inputted will be described according to a flow chart shown FIG. 20(a).
Presence or absence of X and Y data (Step 2000): When available, the following operations are carried out: EQU Xe-Xs=XL EQU Ye-Ys=YL
Is .vertline.XL.vertline. zero or 2.multidot.Rn? (Step 2002):
If NO, it is determined whether or not 0&lt;.vertline.XL.vertline.&lt;2Rn is held (Step 2003). If YES, the central position (a, b) is obtained by inserting the machining start point (Xs, Ys), the machining end point (Xe, Ye) and the radius Rn in the following equations (Step 2004): EQU (Xs-a).sup.2 +(Ys-b).sup.2 =Rn.sup.2 EQU (Xe-a).sup.2 +(Te-b).sup.2 =Rn.sup.2
After .vertline.XL.vertline. has been determined zero (0) in the above-described Step 2002, determination is given to .vertline.YL.vertline. (Step 2006). When it is determined that 0&lt;.vertline.YL.vertline.&lt;2Rn is established, then Step 2004 is effected; that is, the above-described calculations are carried out to obtain the central position (a, b). When, in Step 2006, it is determined that .vertline.YL.vertline.=2Rn, then it is determined whether YL is larger or smaller than zero (0) (Step 2008). When YL&gt;0, the central position (a, b) is obtained according to the following equations (Step 2009): EQU a=Xe EQU b=Ye-Rn
When YL&lt;0, the following equations are used to obtain the central position (Step 2010): EQU a=Xs EQU b=Ys-Rn
When it is determined that, in Step 2002, .vertline.XL.vertline.=2Rn, then it is determined whether XL is larger or smaller than zero (0). (Step 2011). When XL&gt;0, the central position (a, b) is obtained according to the following equations (Step 2012): EQU a=Xe-Rn EQU b=Ye
When XL&lt;0, the following equations are used to obtain the central position (a, b) (Step 2013): EQU a=Xs-Rn EQU b=Ys
when, during the above-described arithmetic operation, it is determined that .vertline.XL.vertline.&gt;2Rn in Step 2003, and it is determined that .vertline.YL.vertline.&gt;2Rn in Step 2006, errors are resulted because those conditions are not established (Steps 2005 and 2007).
FIG. 20(c) shows the case where the start point coordinates and the end point coordinates are determined by using distances Rs and Re from the original point and angles .theta.s and .theta.e. If, in the determination of whether or not X and Y data are available (Step 2000), the result is "NO", then it is determined whether or not R and .theta. data are available (Step 2014), and X and Y data are calculated according to the following equations by using the R and .theta. data (Step 2015): EQU Xs=Rs cos .theta.s EQU Ys=Rs sin .theta.s EQU Xe=Re cos .theta.e EQU Ye=Re sin .theta.e
Thereafter, Step 2001 is effected, and the operation is carried out similarly as in the case of X and Y data.
If, in Step 2014, it is determined that no R and .theta. data are available, then an error is resulted because only X and Y data and R and .theta. data are handled in this case (2016).
The central position coordinates (a, b) obtained through an arithmetic operation shown in FIG. 20(a) are inputted with the data keys 301 (FIG. 10), and set with the "INPUT" key 304 (FIG. 10).
Thereafter, in the data display region 11, the questions are provided successively in the order listed therein. For each of the questions thus provided, similarly as in the above-described case, data are inputted by using the data keys 301 (FIG. 10) and set with the "INPUT" key 304 (FIG. 10).
After a data inputting and setting operation for the last question "9. QUESTION FOR RETURN POSITION", the "AUTOMATIC PRO GRAPHIC" key 305 (FIG. 10) is depressed, and then a machining pattern graph is displayed.
Thereafter, the figure in the picture displayed is compared with FIG. 7 for any error. After it has been confirmed that no error is involved, the "NEXT PICTURE" key 3021 (FIG. 10) is depressed, so that the drilling pattern selection picture (FIG. 15) is displayed again (Step 91 in FIG. 9).
Since the data have been inputted and set, the echo switch 208 (FIG. 10) corresponding to "8. DEFINITION END" is depressed, as a result of which the machining definition start picture (FIG. 11) is displayed again (Step 81 in FIG. 9) while the machining definition list 110 is displayed on the data display section 11. The list is compared with the drawing (FIG. 7) for any error. After it is confirmed that there is no error, the echo key 208 (FIG. 10) corresponding to "8. MACHINING DEFINITION END" 1208 is depressed. As a result, Step 10 (FIG. 9) is effected through Step 71 (FIG. 9), and the picture is then switched over to the machining step list picture (FIG. 18).
When the "NEXT PICTURE" KEY 3021 (FIG. 10) is depressed while the last machining data in the list is being displayed on the question region 13 by operating the cursor keys 3022 (FIG. 10), Step 11 (FIG. 9) is effected, so that the picture is switched over to an NC data forming picture (FIG. 19}. A necessary program name, program number, and "YES" for "NC data formation?" are inputted. As a result, NC data are automatically formed, and "NC DATA HAVE BEEN FORMED" is displayed on the question region 13 (FIG. 10). Thus, the operation has been accomplished. When the "NEXT PICTURE" key 3021 is depressed for instance for the next work, then the operation is returned to the first Step 0 through Step 12.
In the case where holes are drilled at intervals of irregular pitch or irregular angle, heretofore the data are inputted and set as follows: According to the drilling (arc) pattern definition picture (FIG. 16), the first and second machining points are assigned to the first group (FIG. 8(b)), the third and fourth machining points to the second group (FIG. 8(c)), and the fifth and sixth machining points to the third group (FIG. 8(d)).
In the data inputting and setting method, the data for the first group of machining points are inputted and set, according to the above-described method (FIG. 9), through the machining configuration definition (Step 7), the machining position pattern definition (Step 8) and the graphic display (Step 9). Thereafter, the operation returning to Step 88 through Step 91, the data inputting and setting operation for the second group of machining points (FIG. 8(c)) is started. The machining position pattern definition (Step 8) and the graphic display (Step 9) are carried out. Then, the operation is returned to Step 8 through Step 91, so that the data inputting and setting operation for the third group of machining points (the part (d) of FIG. 8) is started. The machining position pattern definition (Step 8), the graphic display (Step 9) and Step 9 are carried out again. When the data inputting and setting operations for all the groups of machining points have been accomplished in this manner, the Steps 81 and 71 are effected, and, similarly as in the above-described case, Steps 10, 11 and 12 are effected. Then, the operation has been ended.
In the above-described case, Steps 8, 9 and 91 are repeated three times for inputting and setting the data. That is, if, in drilling holes equal in diameter and in depth, the machining position pattern is not included in the menu, then it is necessary to divide the data for them in inputting them. Accordingly, it is necessary to repeat Steps 8, 9 and 91 the same times as the number of division.
The conventional numerical control device input format is arranged as described above. Therefore, in the case where for instance the central position is not indicated in the drawing, the operator inputs it by calculating unknown data according to the mounting positions and dimensions indicated in the drawing; or in the case where holes to be drilled are positioned at intervals of irregular pitch or irregular angle, the holes are assigned into a plurality of groups to input the data. Thus, the data inputting and setting operation is troublesome.
Accordingly, the program inputting operation is low in efficiency. In addition, for instance when data inputted is being processed although the machining operation has not been finished, the operation of the machining is suspended until the arithmetic operation ends.